<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle='İletişim';
$this->breadcrumbs=array(
	'İletişim',
);
?>
<style>
      #map-canvas {
        height: 400px;
        width: 600px;
        margin: 0px;
        padding: 0px
      }
</style>
<h1>İletişim</h1>

<br/><br/>
<p>
    <b>Adres   :</b>Alınteri Bulvarı 1262. Sk No.: 4<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Örnek Sanayi Sitesi) 06370 Ostim/ANKARA<br/>
    <b>Telefon :</b>0312 354 46 27 - 28<br/>
    <b>Faks    :</b>0312 385 39 23 - 25<br/>
    <b>Email   :</b>info@aydan-ltd.com.tr<br/>
    <b>Web     :</b> <a href="http://www.aydanyayincilik.com" target="new">http://www.aydanyayincilik.com</a><br/><br/>
</p>

<script type="text/javascript"
      src="https://maps.googleapis.com/maps/api/js?key=AIzaSyALJhCGurReuWBjnyQYoW5GgIn-z5uuers&sensor=true">
</script>
<script>
var map;
var myLatlng = new google.maps.LatLng(39.974935,32.758377);
function initialize() {
  var mapOptions = {
    zoom: 15,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById('map-canvas'),mapOptions);
  
  var contentString = '<div id="content">'+
      '<h3 id="firstHeading" class="firstHeading">Aydan Yayıncılık Web Tesisleri</h3>'+
      '<div id="bodyContent">'+
      '<p>Adres:</b> Alınteri Bulvarı 1262. Sk No.: 4<br/>' +
                      '(Örnek Sanayi Sitesi) 06370 Ostim/ANKARA<br/>' +
                      '<b>Telefon:</b> 0312 354 46 27 - 28<br/>' +
                      '<b>Belgeç(faks):</b> 0312 385 39 23 - 25<br/>' +
                      '<b>E-mail:</b> info@aydan-ltd.com.tr<br/>' +
                      '<b>Web:</b> <a href="http://www.aydanyayincilik.com">www.aydanyayincilik.com</a></p>' +
                      '</div>' +
                      '</div>';

              var infowindow = new google.maps.InfoWindow({
                  content: contentString
              });


              var marker = new google.maps.Marker({
                  position: myLatlng,
                  map: map,
                  title: "Aydan Yayıncılık Web Tesisleri!"
              });
              google.maps.event.addListener(marker, 'click', function() {
                  infowindow.open(map, marker);
              });

          }

          google.maps.event.addDomListener(window, 'load', initialize);

</script>
<div id="map-canvas" style="border:1px solid black"></div>

<br/>

<?php if(Yii::app()->user->hasFlash('contact_1')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('contact_1'); ?>
</div>

<?php else: ?>

<p>
Bize iletmek istediğiniz ve/veya sormak istediğiniz herhangi bir mesajınız var ise lütfen aşağıdaki formu doldurarak bize iletiniz. Teşekkürler.
</p>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contact-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'Adınız'); ?>
		<?php echo $form->textField($model,'name'); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'E-mMil'); ?>
		<?php echo $form->textField($model,'email'); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'konu'); ?>
		<?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'subject'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'İçerik'); ?>
		<?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'body'); ?>
	</div>

	<?php if(CCaptcha::checkRequirements()): ?>
	<div class="row">
		<?php echo $form->labelEx($model,'Güvenlik Kodu'); ?>
		<div>
		<?php $this->widget('CCaptcha'); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
		</div>
		<div class="hint">Lütfen resimde gördüğünüz karakterleri yazınız.</div>
		<?php echo $form->error($model,'verifyCode'); ?>
	</div>
	<?php endif; ?>

	<div class="row buttons readmore">
		<?php echo CHtml::submitButton('Gönder'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php endif; ?>